package com.example.pfe_copie_finale;

import com.example.pfe_copie_finale.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;

import android.os.Bundle;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.Toast;

public class BonLivraison2 extends Activity implements
		AdapterView.OnItemSelectedListener, OnClickListener {
	Button Suivant = null;
	Button valider = null;
	TextView selection;
	String[] items = { "thisjjj", "is", "a", "really", 
			"really2", "really3",
			"really4", "really5", "silly", "list" };

	

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_bon_livraison2);
		
			Suivant= (Button)findViewById(R.id.Suivant);
			Suivant.setOnClickListener(this);
			valider= (Button)findViewById(R.id.valider);
			valider.setOnClickListener(this);
			
			selection = (TextView) findViewById(R.id.selection);
			

			Spinner spin = (Spinner) findViewById(R.id.spinner);
			spin.setOnItemSelectedListener(this);

			ArrayAdapter aa = new ArrayAdapter(
					this,
					android.R.layout.simple_spinner_item, 
					items);

			aa.setDropDownViewResource(

					android.R.layout.simple_spinner_dropdown_item);
			spin.setAdapter(aa);
			
			
			
			
	}



	@Override
	public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,
			long arg3) {
		// TODO Auto-generated method stub
		
	}



	@Override
	public void onNothingSelected(AdapterView<?> arg0) {
		// TODO Auto-generated method stub
		
	}



	public void onClick(View v) {
		if(v == Suivant){
			Intent monIntent = new Intent(this,BonLivraison3.class);
	  	      startActivity(monIntent);}
		else{
  			if(v == valider){
  				Intent monIntent = new Intent(this,BonLivraison3.class);
  		  	      startActivity(monIntent);}
	




	}
}
}